@extends('master')

@section('title', '简历审核')

@section('content')
<div class="row">
	<div class="col-md-12">
		@include('message')
		<p class="lead">
			简历审核 <% $get_status %>
		</p>

	</div>
</div>

<div class="row">
	<div class="col-md-12">
		<form class="form-inline" role="form" action="<% route('admin.resumes.index') %>" method="GET">
			<% Form::select('gender', $array_gender, $get_gender, array('class' => 'form-control')) %>

			<% Form::select('education', $array_education, $get_education, array('class' => 'form-control')) %>

			<% Form::select('experience', $array_experience, $get_experience, array('class' => 'form-control')) %>

			<% Form::select('job', $array_jobs, $get_job, array('class' => 'form-control')) %>

            <% Form::select('marriage', $array_marriage, $get_marriage, array('class' => 'form-control')) %>

            <% Form::select('expectation', $array_expectation, $get_expectation, array('class' => 'form-control')) %>

			<% Form::select('status', $array_status, $get_status, array('class' => 'form-control')) %>

			<button type="submit" class="btn btn-default">查询</button>
		</form>
		@if(!$resumes->count())
		<br />
		<div class="alert alert-warning alert-dismissible" role="alert">
			<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  			<strong>Opps!</strong> 没有找到相关的记录.
		</div>
		@else
		<div class="table-responsive" style="margin-top:10px;background-color:#fff;">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>
							简历编号</th>
						<th>姓名</th>
						<th>性别</th>
						<th>出生日期</th>
						<th>现居地</th>
                        <th>婚姻</th>
						<th>学历</th>
                        <th>期望年薪</th>
						<th>工作经验</th>
						<th>申请职位</th>
						<th>投递时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					@foreach($resumes as $resume)
					<tr>
						<td>
							<% $resume->id %></td>
						<td>
							<% $resume->name %>
						</td>
						<td>
							<% $resume->gender %>
						</td>
						<td>
							<% $resume->birthday %>
						</td>
						<td>
							<% $resume->place %>
						</td>
                        <td>
                            <% $resume->marriage %>
                        </td>
						<td>
							<% $resume->education %>
						</td>
                        <td>
                            <span class="badge">￥<% $resume->expectation %></span>
                        </td>
						<td>
							<span class="badge"><% $resume->experience %></span>
						</td>
						<td>
							<span class="label label-default"><% $resume->job->name %></span>
						</td>
						<td><% $resume->created_at.'('.$resume->created_at->diffForHumans().')' %></td>
						<td>
							<span class="label <% !$resume->status ? 'label-danger' : 'label-success' %>"><% !$resume->status ? '未审核' : '已审核' %></span>
						</td>
						<td>
							<% Form::open(array('route' => array('admin.resumes.destroy', $resume->id), 'method' => 'DELETE', 'class' => 'delete-form form-inline invisible')) %>
								<% link_to_route('admin.resumes.show', '查看', $resume->id, array('target' => '_blank')) %> 
								<button type="submit" class="btn btn-link btn-xs" onclick="if(!confirm('你确定要删除么')){ return false; }">删除</button>
							<% Form::close() %>
						</td>
					</tr>
					@endforeach
				</tbody>
				<tfoot>
					<tr>
						<th>
							简历编号</th>
						<th>姓名</th>
						<th>性别</th>
						<th>出生日期</th>
						<th>现居地</th>
                        <th>婚姻</th>
						<th>学历</th>
                        <th>期望年薪</th>
						<th>工作经验</th>
						<th>申请职位</th>
						<th>投递时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</tfoot>
			</table>
		</div>
		@endif

		<div class="text-center">
			<% $resumes->links() %>
		</div>
	</div>
</div>
@stop